package kr.co.redcircle.console.dialog;

import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

public abstract class ConsoleDialogContents extends Composite {

	private Object result;
	private Point dialogSize = null;
	private Rectangle dialogContentsBound = null;
	protected AlertMessageContent messageContent;

	public ConsoleDialogContents(Composite parent, int style) {
		super(parent, style);
	}

	public ConsoleDialogContents(Composite parent, Integer style, Point dialogSize, Rectangle contentsBound) {
		super(parent, style);
		this.dialogSize = dialogSize;
		this.dialogContentsBound = contentsBound;
	}

	public Point getDialogSize() {
		return dialogSize;
	}

	public void setDialogSize(Point dialogSize) {
		this.dialogSize = dialogSize;
	}

	public Rectangle getDialogContentsBound() {
		return dialogContentsBound;
	}

	public void setDialogContentsBound(Rectangle dialogContentsBound) {
		this.dialogContentsBound = dialogContentsBound;
	}

	public void setResult(Object result) {
		this.result = result;
	}

	public void close(){
		this.getParent().dispose();
	}

	public void setMessageContents(AlertMessageContent mdc) {
		this.messageContent = mdc;
		setupMessageContents();
	}

	public abstract void createContents(Shell parent);

	public abstract  void setupMessageContents();
	
}
